<template>
  <div class="lbt">
    <el-carousel :interval="4000" type="card" height="200px">
      <el-carousel-item v-for="(item, index) in img" :key="index">
        <div class="medium"><img :src="item" width="100%" height="200" /></div>
      </el-carousel-item>
    </el-carousel>

    <el-container>
      <el-main>
        <!-- 图标卡片效果的组件 -->
        <lco></lco>
        <!-- 图标卡片效果的组件 -->
      </el-main>
    </el-container>
  </div>
</template>

<script>
import lco from "../../components/Ico.vue";
export default {
  name: "lbt",
  data() {
    return {
      img: [],
    };
  },
  components: {
    lco,
  },
  created() {
    var src = [];
    this.$axios
      .get("/banner", {
        paras: {
          type: "0",
        },
      })
      .then((res) => {
        res.data.banners.forEach((item) => {
          src.push(item.imageUrl);
        });
      });
    this.img = src;
  },
};
</script>

<style lang="scss">
.lbt {
  .el-main ::-webkit-scrollbar {
    display: none; /* Chrome Safari */
  }
  .medium {
    border-radius: 7px !important;
    img {
      border-radius: 7px !important;
    }
  }
}
</style>
